#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:4996)
#include<stdio.h>
#include<string.h>
size_t My_strlen(const char* p) {
    char* p1 = p;
    while (*p1) {
        p1++;
    }
    return p1 - p;
}
char* My_strcpy(char* des, const char* soc) {
    int n = (int)strlen(soc);
    while (*des = *soc) {
        des++;
        soc++;
    }
    des -= n;
    return des;
}
char* My_strcat(char* des, const char* soc) {
    int cnt = 0, cnt1 = 0;
    while (*des) {
        des++;
        cnt++;
    }
    while (*soc) {
        *des = *soc;
        des++;
        soc++;
        cnt1++;
    }
    return des - cnt - cnt1;
}
int main() {
    char str[100] = "hello world!";
    /*
    printf("%d ", (int)strlen(str));

    printf("%d ", (int)My_strlen(str));*/

    char str2[100] = "lyy";
    char str3[100] = "lyy2";
   /* printf("%s ", strcpy(str, str2));
    printf("%s ", My_strcpy(str, str3));*/

    printf("%s\n", strcat(str, str2));
    printf("%s\n", My_strcat(str, str3));

    return 0;
}